home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Translation.h
-
- Copyright: © 1984-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Version: Built by: anonymous
- From: Translation.i, revision 9, dated 6/21/94
- With Interfacer: 1.1d4e2
-
- Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- List the version information from above in Problem Description.
-
- */
-
- #ifndef __TRANSLATION__
- #define __TRANSLATION__
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #ifndef REZ
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
- /* #include <OSUtils.h> */
- /* #include <SegLoad.h> */
-
- #ifndef __COMPONENTS__
- #include <Components.h>
- #endif
-
- #ifndef __TRANSLATIONEXTENSIONS__
- #include <TranslationExtensions.h>
- #endif
- /* #include <Memory.h> */
- /* #include <Quickdraw.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- /* #include "Components.h" */
- #define gestaltTranslationPPCAvail 2
-
- #define gestaltTranslationGetPathAPIAvail 3
-
- typedef short DocOpenMethod;
-
-
- enum {
- domCannot,
- domNative,
- domTranslateFirst,
- domWildcard
- };
-
- typedef OSType TypesBlock[64];
-
- typedef OSType *TypesBlockPtr;
-
- #define TranslationScrapProgressDialogID -16555
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FileTranslationSpec {
- OSType componentSignature;
- const void *translationSystemInfo;
- FileTypeSpec src;
- FileTypeSpec dst;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FileTranslationSpec FileTranslationSpec;
-
- typedef FileTranslationSpec *FileTranslationSpecArrayPtr;
-
- extern pascal OSErr GetFileTypesThatAppCanNativelyOpen(short appVRefNumHint, OSType appSignature, FileType *nativeTypes)
- TWOWORDINLINE(0x701C, 0xABFC);
- extern pascal OSErr ExtendFileTypeList(const FileType *originalTypeList, short numberOriginalTypes, FileType *extendedTypeList, short *numberExtendedTypes)
- TWOWORDINLINE(0x7009, 0xABFC);
- extern pascal OSErr CanDocBeOpened(const FSSpec *targetDocument, short appVRefNumHint, OSType appSignature, const FileType *nativeTypes, Boolean onlyNative, DocOpenMethod *howToOpen, FileTranslationSpec *howToTranslate)
- TWOWORDINLINE(0x701E, 0xABFC);
- extern pascal short GetFileTranslationPaths(FSSpec *srcDocument, FileType dstDocType, unsigned short maxResultCount, FileTranslationSpecArrayPtr resultBuffer)
- TWOWORDINLINE(0x7038, 0xABFC);
- extern pascal OSErr GetPathFromTranslationDialog(const FSSpec *theDocument, const FSSpec *theApplication, const TypesBlockPtr typeList, DocOpenMethod *howToOpen, FileTranslationSpec *howToTranslate)
- TWOWORDINLINE(0x7037, 0xABFC);
- extern pascal OSErr TranslateFile(const FSSpec *sourceDocument, const FSSpec *destinationDocument, const FileTranslationSpec *howToTranslate)
- TWOWORDINLINE(0x700C, 0xABFC);
- extern pascal OSErr GetDocumentKindString(short docVRefNum, OSType docType, OSType docCreator, Str63 kindString)
- TWOWORDINLINE(0x7016, 0xABFC);
- extern pascal OSErr GetTranslationExtensionName(const FileTranslationSpec *translationMethod, Str31 extensionName)
- TWOWORDINLINE(0x7036, 0xABFC);
- typedef pascal OSErr (*GetScrapDataProcPtr)(ScrapType requestedFormat, Handle dataH, void *srcDataGetterRefCon);
- extern pascal OSErr TranslateScrap(GetScrapDataProcPtr sourceDataGetter, void *sourceDataGetterRefCon, ScrapType destinationFormat, Handle destinationData, short progressDialogID)
- TWOWORDINLINE(0x700E, 0xABFC);
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TRANSLATION__ */
-